﻿<%@ WebHandler Language="C#" Class="PhuKien_DelByID" %>

using System;
using System.Web;
using HNG.Portal.BLL;
using HNG.Portal.DAL;
using HNG.Portal.DAL.EntityClasses;
using HNG.Portal.DAL.FactoryClasses;
using HNG.Portal.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

public class PhuKien_DelByID : IHttpHandler
{
    TblSanPhamPhuKienManager _TblSanPhamPhuKienManager = new TblSanPhamPhuKienManager();
    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/html";
        int numberRt = -1;
        int pkID = 0;
        try { pkID = Convert.ToInt32(context.Request.QueryString["id"].Trim()); }
        catch { pkID = 0; }

        if (pkID != 0)
        {
           numberRt = _TblSanPhamPhuKienManager.DeleteById(pkID);
           
        }
        context.Response.Write(numberRt.ToString());
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}